package com.xq.tmall.service.impl;

import com.xq.tmall.dao.LookRecordDao;
import com.xq.tmall.entity.Product;
import com.xq.tmall.service.LookRecordService;
import com.xq.tmall.util.PageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName LookRecordServiceImpl
 * @Description TODO
 * @date 2022/1/25 16:00
 * @Version 1.0
 */
@Service
public class LookRecordServiceImpl implements LookRecordService {

    @Autowired
    private LookRecordDao lookRecordDao;
    @Override
    public List<Product> getLookRecrod(Integer userId, PageUtil pageUtil ) {
        return lookRecordDao.getLookRecrod(userId,pageUtil);
    }

    @Override
    public void addLookRecord(Integer userId, String productId) {
        try {
            lookRecordDao.addLookRecord(userId,Integer.parseInt(productId));
        }catch (Exception e){

        }

    }
}
